<?php echo $header;echo $sidebar ?>	

		<link rel="stylesheet" href="<?php echo base_url(); ?>/assets/admin/css/new_font-awesome.css"/>
		<link href="<?php echo $this->config->base_url(); ?>assets/admin/css/jquery-ui.css" rel="stylesheet">
		<link href="<?php echo $this->config->base_url(); ?>assets/admin/css/chosen.css" rel="stylesheet">
		<link href="<?php echo $this->config->base_url(); ?>assets/admin/css/chosen-bootstrap.css" rel="stylesheet">
		<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/admin/js/chosen.jquery.js"></script>
		<script type="text/javascript" src="<?php echo $this->config->base_url(); ?>assets/admin/js/jquery-ui.js"></script>
		<script src="<?php echo $this->config->base_url(); ?>assets/admin/media/js/jquery.dataTables.columnFilter.js" type="text/javascript"></script>
		
		<script src="<?php echo $this->config->base_url(); ?>/assets/admin/media/js/jquery.dataTables.columnFilter.js" type="text/javascript"></script>
		<style type="text/css">
		.text_filter { width: 100% !important; border: 0 !important; box-shadow: none !important;  border-radius: 0 !important;  padding:0 !important; margin:0 !important; }
		.select_filter { width: 100% !important; padding:0 !important; height: auto !important; margin:0 !important;}
		.col-md-6{float:left;width:47%;}
		#dataTables_filter{float:right;}
		
		.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
	    	min-height: 1px;
	    	padding-left: 15px;
	    	padding-right: 15px;
	    	position: relative;
		}
		</style>
		
		<script type="text/javascript" charset="utf-8">
			$(document).ready( function () {
				$('#fileData').dataTable({
					"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]],
	                "aaSorting": [[ 0, "desc" ]],
	                "iDisplayLength": '10',
			      	'bProcessing'    : true,
			      	'bServerSide'    : true,
			      	'sAjaxSource'    : '<?php echo base_url(); ?>index.php/email_marketing/getdatatableajax',
			      	
				    'fnServerData': function(sSource, aoData, fnCallback) {
					    
						aoData.push( { "name": "<?php echo $this->security->get_csrf_token_name(); ?>", "value": "<?php echo $this->security->get_csrf_hash() ?>" } );
						$.ajax
						({
						      'dataType': 'json',
						      'type'    : 'POST',
						      'url'     : sSource,
						      'data'    : aoData,
						      'success' : fnCallback
						});
				     },
				     
				     "oTableTools": {
				    	 	"sSwfPath" : "<?php echo $this->config->base_url(); ?>/assets/admin/media/swf/copy_csv_xls_pdf.swf",
				    	 	"aButtons": [
					    	 				"csv",
					    	 				"xls",
					    	 				{
					    	 					"sExtends": "pdf",
					    	 					"sPdfOrientation": "landscape",
					    	 					"sPdfMessage": "Your custom message would go here."
					    	 				},
					    	 				"print"
				    	 				]
						},

					"oLanguage": {"sSearch": "Filter: "},
					"aoColumns": [ null,null,null,{ "bSortable": false }]
				}).columnFilter({ 
					"aoColumns": [
							{ type: "text", bRegex:true },
							{ type: "text", bRegex:true },
							{ type: "text", bRegex:true },
							null
							]
				});
				
			});
		</script>

		<style>
			a.edit_icon {
		    background: url("<?php echo $this->config->base_url(); ?>assets/admin/admin_images/icons/edit.gif") no-repeat scroll left top transparent;
		    display: inline-block;
		    height: 16px;
		    width: 16px;
			}
			a.delete2_icon {
   	 			background: url("<?php echo $this->config->base_url(); ?>assets/admin/images/icon/delete.png") no-repeat scroll left top transparent;
    			display: inline-block;
    			height: 16px;
    			width: 16px;
			}
			ul.yiiPager {
			    border: 0 none;
			    display: inline;
			    font-size: 11px;
			    line-height: 100%;
			    margin: 0;
			    padding: 0;
			}
			
			ul.yiiPager a:link, ul.yiiPager a:visited {
			    border: 1px solid #9AAFE5;
			    color: #0E509E;
			    font-weight: bold;
			    padding: 1px 6px;
			    text-decoration: none;
			}
		</style>
		<div class="span10 content">

			<?php echo $hugemenu ?>

			<h1>Email Marketing</h1>

			<?php if($this->session->flashdata('message')) {?>
			<div class="alert alert-success">
				<?php echo $this->session->flashdata('message') ?>
			</div>
			<br />
			<?php  }?>
			

			<div>
			
				<!-- Nav tabs -->
				<ul class="nav nav-tabs">
				  <li class="active"><a href="#">Templates</a></li>
				  <li><a href="settings">Settings</a></li>
				  <li><a href="mass_campaigns">Mass Campaigns</a></li>
				  <li><a href="sent_mail">Sent Mail</a></li>
				  <li><a href="hot_leads">Hot Leads</a></li>
				  <li><a href="alerts">Alerts</a></li>
				  <li><a href="subscription">Subscriptions</a></li>
				  <li><a href="mailing_list">Mailing List</a></li>
				  <li><a href="filters">Filters</a></li>
				  <li><a href="../emailgroup">Group</a></li>
				</ul>
				
				<!-- Tab panes -->
				<div class="tab-content">
				  
				  <table id="fileData" cellpadding=0 cellspacing=10 class="table table-bordered table-hover table-striped">

					<thead>
						<tr>
							<th>Type </th>
                			<th>Title </th>
                			<th style="width:125px;">Status</th>
                			<th style="width:45px;">Action</th>
						</tr>

					</thead>
					<tbody>
						<tr>
			            	<td colspan="4" class="dataTables_empty">Loading data from server</td>
						</tr>
			        </tbody>
					<tfoot>
						<tr>
							<th>Type </th>
                			<th>Title </th>
                			<th style="width:125px;">Status</th>
                			<th style="width:45px;">Action</th>
						</tr>

					</tfoot>
					</table>
				
					<p><a href="<?php echo site_url('email_marketing/add_emailmarketing_template');?>" class="btn btn-primary"><i class="icon-inbox"></i> Email Marketing Template</a></p>
				</div>
								
				
			</div>
		</div><!--/content-->
		
		<script src="<?php echo $this->config->base_url(); ?>assets/admin/js/jquery-ui-1.10.2.custom.min.js"></script> <!-- jQuery UI -->
	<script src="<?php echo $this->config->base_url(); ?>assets/admin/js/sparklines.js"></script>
	<script src="<?php echo $this->config->base_url(); ?>assets/admin/js/fullcalendar.min.js"></script> <!-- Full Google Calendar - Calendar -->
	<script src="<?php echo $this->config->base_url(); ?>assets/admin/js/bootstrap-datetimepicker.min.js"></script> <!-- Date picker -->
	<script src="<?php echo $this->config->base_url(); ?>assets/admin/js/DT_bootstrap.js"></script> <!-- jQuery UI -->
	<script src="<?php echo $this->config->base_url(); ?>assets/admin/js/jquery.prettyPhoto.js"></script> <!-- prettyPhoto -->
<?php echo $footer ?>
<script>
$(document).ready( function () {
    $(".collapse").collapse()({
      show: false
      });
});
</script>